//@ts-nocheck
import { defineStore } from "pinia";

export const useLocalStore: any = defineStore("device_localStore", {
  state: () => {
    return {
      markerClusterFlag: true,
      statisticsCategory: -1,
      statisticChartVisible: false,
      statisticsCondition: null,
      statisticsConditionFromChart: null,
      selectedFeature: null,
      drawManager: null
    };
  },
  actions: {
    setMarkerClusterFlag(value) {
      this.markerClusterFlag = value;
    },
    setStatisticsCategory(value) {
      this.statisticsCategory = value;
    },
    showStatisticChart(flag: boolean) {
      this.statisticChartVisible = flag;
    },
    setStatisticsCondition(obj: any) {
      this.statisticsCondition = obj;
    },
    setStatisticsConditionFromChart(obj: any) {
      this.statisticsConditionFromChart = obj;
    },
    setSelectedFeature(feature: any) {
      this.selectedFeature = feature;
    },
    setDrawManager(manager: any) {
      this.drawManager = manager
    }
  },
});
